<template>
  <div class="header">
    <el-form>
      <el-form-item label="区域搜索：" >
        <el-input v-model="form.name" style="width: 200px"
        placeholder="请输入"></el-input>
        <el-button type="primary" icon="el-icon-search" @click="searchFn">查询</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  data () {
    return {
      form: {
        name: ''
      }
    }
  },
  methods: {
    searchFn () {
      this.$emit('searchFn', this.form.name)
    }
  }
}
</script>

<style scoped>
.header {
  width: 100%;
  height: 60px;
  background-color: #fff;
  padding-top: 20px;
  padding-left: 20px;
}
.el-button {
  margin-left: 20px;
}
body {
  background-color: #f8fafd;
}
</style>
